<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  请输入<input type="text" id="input">
  <script>
    // 点击input触发事件顺序
    // onmouseover 鼠标移进
    // onmouseenter 鼠标移进
    // onfocus 获得焦点
    // onmousedown 鼠标按下
    // onmouseup 鼠标放开
    // onclick 一次点击
    let input = document.getElementById("input")
    input.onclick = function(){
      console.log("onclick")
    }
    input.onfocus = function(){
      console.log("onfocus")
    }
    input.onmousedown = function(){
      console.log("onmousedown")
    }
    input.onmouseenter = function(){
      console.log("onmouseenter")
    }
    input.onmouseup = function(){
      console.log("onmouseup")
    }
    input.onmouseover = function(){
      console.log("onmouseover")
    }
  </script>
</body>
</html>